package com.hxzy.bbs.servlet;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.hxzy.jsp.dao.PostDAO;
import com.hxzy.jsp.dao.PostDAOImpl;
import com.hxzy.jsp.dao.UserDAOImpl;
import com.hxzy.jsp.entity.Post;
import com.hxzy.jsp.entity.User;
import com.hxzy.jsp.utils.Page;

public class MyServlet extends AppServlet {
	private static final long serialVersionUID = 1L;

	public MyServlet() {
		super();
	}

/*	protected void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		request.setCharacterEncoding("UTF-8");
		Post post=(Post)request.getSession().getAttribute("post");
		PostDAO postDAO = new PostDAOImpl();
		List<Post> postList = postDAO.findMy(post.getUserId());
		if (postList == null) {
			response.sendRedirect("./error");
			return;
		}
		request.setAttribute("postList", postList);
		// 把数据保存在 request 作用域里，传递到 jsp 页面用于渲染
		request.getRequestDispatcher("/WEB-INF/my.jsp").forward(request, response);
	}

	@Override
	protected void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}*/
}